package com.hrpc.utils.zookeeper;


public class ZookeeperNode {
    private String nodePath;
    private byte[] data;

    public ZookeeperNode(String nodePath, byte[] data) {
        this.nodePath = nodePath;
        this.data = data;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("ZookeeperNode{");
        sb.append("nodePath='").append(nodePath).append('\'');
        sb.append(", data=");
        if (data == null) sb.append("null");
        else {
            sb.append('[');
            for (int i = 0; i < data.length; ++i)
                sb.append(i == 0 ? "" : ", ").append(data[i]);
            sb.append(']');
        }
        sb.append('}');
        return sb.toString();
    }

    public String getNodePath() {
        return nodePath;
    }

    public void setNodePath(String nodePath) {
        this.nodePath = nodePath;
    }

    public byte[] getData() {
        return data;
    }

    public void setData(byte[] data) {
        this.data = data;
    }

    public ZookeeperNode() {
    }
}
